package org.aurora.module.user.infra.dal.mysql.dataobject;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.aurora.framework.boot.data.common.dataobject.AuditDO;
import org.aurora.framework.boot.data.mybatis.audit.AuditInsertListener;
import org.aurora.framework.boot.data.mybatis.audit.AuditUpdateListener;

import java.io.Serial;

/**
 * RoleDO
 * <pre>
 * description:
 * create date: 2025-03-22 18:01:49
 * </pre>
 *
 * @author cao.yong
 */
@Getter
@Setter
@ToString
@Table(value = "sys_role", comment = "系统角色", onInsert = AuditInsertListener.class, onUpdate = AuditUpdateListener.class)
public class RoleDO extends AuditDO<Long> {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 角色名称
     */
    private String name;

    /**
     * 角色编码
     */
    private String code;

    /**
     * 角色备注
     */
    private String remark;
}
